/*
 * @Author: 
 * @Date: 2022-02-08 11:00:13
 * @LastEditors: lqj
 * @LastEditTime: 2022-02-14 15:27:00
 * @Description: 路由hooks
 */
import React from 'react';
import {
  NavLink
  // useHistory, useLocation, useParams, useRouteMatch
} from 'react-router-dom'

export default function MyNavLink(props) {
  // 非路由组件可以在函数组件开启hooks使用useHistory, useLocation, useParams, useRouteMatch进行路由组件的操作和数据获取
  // const history = useHistory()
  return (
    // <NavLink exact={exact || false} activeClassName='active' className="list-group-item" to={to}>{children}</NavLink>
    <NavLink activeClassName='active' className="list-group-item" style={{margin: '5px', padding: '5px 10px'}} {...props} />
    // <NavLink to='/' children="Hello"></NavLink>
  );
}

